package com.clarence.dada.modular.system.menu.entity.req;

import com.clarence.dada.core.base.BaseReq;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 菜单资源的请求
 *
 * @author GD
 * @since 2021/8/8 22:40
 */
@Data
@Schema(title = "系统菜单资源请求实例")
@EqualsAndHashCode(callSuper = true)
public class SysMenuResourceReq extends BaseReq {

    /**
     * 业务id不能为空
     */
    @NotNull(message = "资源主键不能为空", groups = {list.class, add.class})
    @Schema(title = "主键", example = "1")
    private Long menuResourceId;

    /**
     * 绑定资源的类型，1：菜单，2：菜单下按钮
     */
    @NotNull(message = "绑定的资源类型不能为空", groups = {add.class})
    @Schema(title = "绑定资源的类型", example = "button")
    private Integer businessType;

    /**
     * 模块下所有的资源
     */
    @Schema(title = "模块下所有的资源", example = "1,2,3,4,5")
    private List<String> modularTotalResource;

    /**
     * 模块下选中的资源
     */
    @Schema(title = "模块下选中的资源", example = "1,2,3")
    private List<String> selectedResource;

}
